/*
*	Developed by Leonardo Chatain and Pedro Dusso, at Universidade Federal do Rio Grande do Sul, Brasil, 2009/1
*	Source available at glpacman.codeplex.com
*/

#pragma once
#ifndef _PACMAN_H_
#define _PACMAN_H_

#include "character.h"
#include <iostream>
#include "Definitions.h"
#include <GL/glut.h>
#include <ctime>

using namespace std;

class Pacman :
	public Character
{
private:
	int lives;
	int score;
	bool super;
	int remainingTime;
	float superTime;
	int phantomsAte;

public:
	Pacman(void);
	Pacman(float x, float y);
	Pacman(Point2D pos);
	Pacman(Point2D pos, Vector2D vec);
	~Pacman(void);

	void draw();
	void updateSuper();

	// Getters and Setters
	inline int getLives() { return lives; }
	inline void setLives(int Lives) { lives = Lives; }
	inline int getScore() { return score; }
	inline void setScore(int Score) { score = Score; }
	inline bool isSuper() { return super; }
	inline void setSuper() { super = true; remainingTime = superTime*1000;}
	inline void unsetSuper() { super = false; phantomsAte=0; }
	inline void setSuperTime(float t) { if (t>=0) superTime = t; }
	inline float getSuperTime() { return superTime; }
	inline int getPhantomsAte() {return phantomsAte;}
	inline void increasePhantomsAte(){ phantomsAte++; phantomsAte %= 4; }
	inline void setPhantomsAte(int p) { phantomsAte=p; }
};

#endif;